firmware-utils: tplink-safeloader: support strings as soft_version
authorJan Niehusmann <[email protected]>
Fri, 19 May 2017 07:42:24 +0000 (09:42 +0200)
committerPiotr Dymacz <[email protected]>
Sun, 11 Jun 2017 17:06:49 +0000 (19:06 +0200)
commit7765f2530de3a2be862c08e2e1e3c793c2008256
tree1e47c1ab6f6c2c2c22a6e4b54bcfe9cb247549c5
parentca7900d0b989cfe260638bd738bc1b9e926a1f36
firmware-utils: tplink-safeloader: support strings as soft_version

Some TP-Link routers (C25, C59, C60) contain a version string instead
of a binary structure in the soft_version partition.

Flashing LEDE from the original firmware's GUI, this version string
taken from the soft_ver partition of the firmware image is written to
the router's config partition.

When using tftp recovery to go back to the original Archer C25 firmware,
a version check compares that version to the version of the firmware to
be flashed.

Without proper contents in the config partition, reverting to the
original firmware fails.

Therefore, write the string "soft_ver:1.0.0\n" to that soft_ver
partition.

Signed-off-by: Jan Niehusmann <[email protected]>
src/tplink-safeloader.c